home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch9 < prev   
Encoding:
Internet Message Format  |  1990-07-12  |  46.4 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i045:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch9
  5. Message-ID: <5860@tekred.CNA.TEK.COM>
  6. Date: 28 Jun 90 23:18:04 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1509
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 10, Issue 45
  13. Archive-name: NetHack3/Patch9
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.     [Unpack in the top level NetHack source directory and apply
  17.      the patchfile using "patch -p <patches09".    -br]
  18.  
  19. [from the development team...]
  20. [[Patchlevel 9 is in fact an amendment patch to Patchlevel 8.  It
  21. contains fixes to some deadly bugs discovered thus far in the Pl8
  22. code.  
  23.  
  24. Among the bugs fixed are a 0 dereference bug in the Amiga code, a
  25. bug in the tins code, a bug in the inventory weight code, a level
  26. files bug in the Mac code, an ST display bug, a bug in the maze's
  27. bones level, a bug with chest traps, a bug in the restoring code, a
  28. vault guard bug, a PC collapsing dungeon bug, and other more minor
  29. bugs.]]
  30.  
  31. #! /bin/sh
  32. # This is a shell archive.  Remove anything before this line, then unpack
  33. # it by saving it into a file and typing "sh file".  To overwrite existing
  34. # files, type "sh file -c".  You can also feed this as standard input via
  35. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  36. # will see the following message at the end:
  37. #        "End of shell archive."
  38. # Contents:  UPDATE9 patches09
  39. # Wrapped by billr@saab on Thu Jun 28 16:13:19 1990
  40. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  41. if test -f 'UPDATE9' -a "${1}" != "-c" ; then 
  42.   echo shar: Will not clobber existing file \"'UPDATE9'\"
  43. else
  44. echo shar: Extracting \"'UPDATE9'\" \(480 characters\)
  45. sed "s/^X//" >'UPDATE9' <<'END_OF_FILE'
  46. XPatchlevel 9 is in fact an amendment patch to Patchlevel 8.  It
  47. Xcontains fixes to some deadly bugs discovered thus far in the Pl8
  48. Xcode.  
  49. X
  50. XAmong the bugs fixed are a 0 dereference bug in the Amiga code, a
  51. Xbug in the tins code, a bug in the inventory weight code, a level
  52. Xfiles bug in the Mac code, an ST display bug, a bug in the maze's
  53. Xbones level, a bug with chest traps, a bug in the restoring code, a
  54. Xvault guard bug, a PC collapsing dungeon bug, and other more minor
  55. Xbugs. 
  56. X
  57. END_OF_FILE
  58. if test 480 -ne `wc -c <'UPDATE9'`; then
  59.     echo shar: \"'UPDATE9'\" unpacked with wrong size!
  60. fi
  61. # end of 'UPDATE9'
  62. fi
  63. if test -f 'patches09' -a "${1}" != "-c" ; then 
  64.   echo shar: Will not clobber existing file \"'patches09'\"
  65. else
  66. echo shar: Extracting \"'patches09'\" \(43223 characters\)
  67. sed "s/^X//" >'patches09' <<'END_OF_FILE'
  68. X*** Install.ami.orig    Fri Jun  1 07:48:38 1990
  69. X--- Install.ami    Tue Jun 26 09:36:23 1990
  70. X***************
  71. X*** 222,230 ****
  72. X      wish to utilize it.
  73. X  
  74. X      Due to a problem with versions 5.04 and 5.05, you must make one change:
  75. X!     edit the file Others:lev_lex.c.  At (or near) line 1002 is the definition
  76. X      for the function yyunput.  Delete the word "register" from this line.
  77. X!     Note that if you neglect to do this, you will get an Error 72 at line 318
  78. X      of file lev_comp.l (this is the correct message - lev_lex.c is flex output).
  79. X      Save the changed file.  Later compiler versions may or may not need this
  80. X      fix.
  81. X--- 222,230 ----
  82. X      wish to utilize it.
  83. X  
  84. X      Due to a problem with versions 5.04 and 5.05, you must make one change:
  85. X!     edit the file Others:lev_lex.c.  At (or near) line 1003 is the definition
  86. X      for the function yyunput.  Delete the word "register" from this line.
  87. X!     Note that if you neglect to do this, you will get an Error 72 at line 319
  88. X      of file lev_comp.l (this is the correct message - lev_lex.c is flex output).
  89. X      Save the changed file.  Later compiler versions may or may not need this
  90. X      fix.
  91. X*** Install.mac.orig    Sat Jun  2 00:09:20 1990
  92. X--- Install.mac    Tue Jun 26 09:36:52 1990
  93. X***************
  94. X*** 157,163 ****
  95. X      int yymorfg;                            int yymorfg;
  96. X      extern char *yysptr, yysbuf[];          extern char *yysptr, *yysbuf;
  97. X      int yytchar;                            int yytchar;
  98. X!     File *yyin ={stdin}, *yyout ={stdout};  File *yyin =stdin, *yyout =stdout;
  99. X      {... near the end ...}
  100. X      {... If you're using LSC or THINKC4 comment out: ...}
  101. X      {... #define NLSTATE yyprevious=YYNEWLINE ...}
  102. X--- 157,163 ----
  103. X      int yymorfg;                            int yymorfg;
  104. X      extern char *yysptr, yysbuf[];          extern char *yysptr, *yysbuf;
  105. X      int yytchar;                            int yytchar;
  106. X!     FILE *yyin ={stdin}, *yyout ={stdout};  FILE *yyin =stdin, *yyout =stdout;
  107. X      {... near the end ...}
  108. X      {... If you're using LSC or THINKC4 comment out: ...}
  109. X      {... #define NLSTATE yyprevious=YYNEWLINE ...}
  110. X*** amiga.old/amiwbench.c    Tue Jun 26 09:30:59 1990
  111. X--- amiga/amiwbench.c    Tue Jun 26 09:36:24 1990
  112. X***************
  113. X*** 117,123 ****
  114. X      strcat(origicon,".info");
  115. X  
  116. X      argline[0]='\0';
  117. X!     for(x=0;p=dobj->do_ToolTypes[x];x++){
  118. X          lp=index(p,'=');
  119. X          if(!lp++){
  120. X              if((strncmp(p,"SCORES",6)==0) ||
  121. X--- 117,123 ----
  122. X      strcat(origicon,".info");
  123. X  
  124. X      argline[0]='\0';
  125. X!     if(dobj->do_ToolTypes)for(x=0;p=dobj->do_ToolTypes[x];x++){
  126. X          lp=index(p,'=');
  127. X          if(!lp++){
  128. X              if((strncmp(p,"SCORES",6)==0) ||
  129. X*** auxil.old/Guidebook.mn    Tue Jun 26 09:31:07 1990
  130. X--- auxil/Guidebook.mn    Tue Jun 26 09:36:45 1990
  131. X***************
  132. X*** 1026,1032 ****
  133. X  .op IBMgraphics
  134. X  options use predefined selections of graphics symbols, so you need not
  135. X  go to the trouble of setting up a full graphics string for these common
  136. X! cases.
  137. X  
  138. X  Note that this option string is now escape-processed in conventional C
  139. X  fashion.  This means that `\\' is a prefix to take the following
  140. X--- 1026,1034 ----
  141. X  .op IBMgraphics
  142. X  options use predefined selections of graphics symbols, so you need not
  143. X  go to the trouble of setting up a full graphics string for these common
  144. X! cases.  These two options also set up proper handling of graphics
  145. X! characters for such terminals, so you should specify them as appropriate
  146. X! even if you override the selections with your own graphics string.
  147. X  
  148. X  Note that this option string is now escape-processed in conventional C
  149. X  fashion.  This means that `\\' is a prefix to take the following
  150. X*** auxil.old/Guidebook.mss    Tue Jun 26 09:31:06 1990
  151. X--- auxil/Guidebook.mss    Tue Jun 26 09:36:44 1990
  152. X***************
  153. X*** 431,437 ****
  154. X  
  155. X  ^P      Repeat previous message (subsequent ^P's repeat earlier messages).
  156. X  
  157. X! q       uaff (drink) a potion.
  158. X  
  159. X  Q       Quit the game.
  160. X  
  161. X--- 431,437 ----
  162. X  
  163. X  ^P      Repeat previous message (subsequent ^P's repeat earlier messages).
  164. X  
  165. X! q       Quaff (drink) a potion.
  166. X  
  167. X  Q       Quit the game.
  168. X  
  169. X***************
  170. X*** 986,992 ****
  171. X  
  172. X          The DECgraphics and IBMgraphics options use predefined selections  of
  173. X          graphics  symbols,  so you need not go to the trouble of setting up a
  174. X!         full graphics string for these common cases.
  175. X  
  176. X          Note that this option string is now escape-processed in  conventional
  177. X          C  fashion.    This  means that `\' is a prefix to take the following
  178. X--- 986,995 ----
  179. X  
  180. X          The DECgraphics and IBMgraphics options use predefined selections  of
  181. X          graphics  symbols,  so you need not go to the trouble of setting up a
  182. X!         full graphics string  for these common cases.  These two options also
  183. X!     set up proper handling  of graphics characters for such terminals, so
  184. X!     you  should  specify  them  as appropriate  even if  you override the
  185. X!     selections with your own graphics string.
  186. X  
  187. X          Note that this option string is now escape-processed in  conventional
  188. X          C  fashion.    This  means that `\' is a prefix to take the following
  189. X*** auxil.old/Guidebook.tex    Tue Jun 26 09:31:07 1990
  190. X--- auxil/Guidebook.tex    Tue Jun 26 09:36:46 1990
  191. X***************
  192. X*** 1105,1111 ****
  193. X  The command to read a scroll is `{\tt r}'.
  194. X  
  195. X  %.hn 2
  196. X! \subsection{Potions (`{\tt !}')}
  197. X  
  198. X  %.pg
  199. X  Potions are distinguished by the color of the liquid inside the flask.
  200. X--- 1105,1111 ----
  201. X  The command to read a scroll is `{\tt r}'.
  202. X  
  203. X  %.hn 2
  204. X! \subsection*{Potions (`{\tt !}')}
  205. X  
  206. X  %.pg
  207. X  Potions are distinguished by the color of the liquid inside the flask.
  208. X***************
  209. X*** 1283,1288 ****
  210. X--- 1283,1289 ----
  211. X      setenv NETHACKOPTIONS "female,!pickup,name:Blue Meanie,fruit:papaya"
  212. X  \end{verbatim}
  213. X  %.ed
  214. X+ 
  215. X  \nd in {\it csh}, or
  216. X  %.sd
  217. X  \begin{verbatim}
  218. X***************
  219. X*** 1290,1295 ****
  220. X--- 1291,1297 ----
  221. X      export NETHACKOPTIONS
  222. X  \end{verbatim}
  223. X  %.ed
  224. X+ 
  225. X  \nd in {\it sh\/} or {\it ksh}.
  226. X  
  227. X  %.hn 2
  228. X***************
  229. X*** 1360,1366 ****
  230. X  {\it IBMgraphics}
  231. X  options use predefined selections of graphics symbols, so you need not
  232. X  go to the trouble of setting up a full graphics string for these common
  233. X! cases.
  234. X  
  235. X  Note that this option string is now escape-processed in conventional C
  236. X  fashion.  This means that `\verb+\+' is a prefix to take the following
  237. X--- 1362,1370 ----
  238. X  {\it IBMgraphics}
  239. X  options use predefined selections of graphics symbols, so you need not
  240. X  go to the trouble of setting up a full graphics string for these common
  241. X! cases.  These two options also set up proper handling of graphics
  242. X! characters for such terminals, so you should specify them as appropriate
  243. X! even if you override the selections with your own graphics string.
  244. X  
  245. X  Note that this option string is now escape-processed in conventional C
  246. X  fashion.  This means that `\verb+\+' is a prefix to take the following
  247. X*** include.old/extern.h    Tue Jun 26 09:31:17 1990
  248. X--- include/extern.h    Tue Jun 26 09:36:38 1990
  249. X***************
  250. X*** 1325,1331 ****
  251. X  E void FDECL(drain_en, (int));
  252. X  #endif
  253. X  E int NDECL(dountrap);
  254. X! E void FDECL(chest_trap, (struct obj *,int));
  255. X  E void NDECL(wake_nearby);
  256. X  E void FDECL(deltrap, (struct trap *));
  257. X  E struct trap *FDECL(t_at, (int,int));
  258. X--- 1325,1331 ----
  259. X  E void FDECL(drain_en, (int));
  260. X  #endif
  261. X  E int NDECL(dountrap);
  262. X! E boolean FDECL(chest_trap, (struct obj *,int));
  263. X  E void NDECL(wake_nearby);
  264. X  E void FDECL(deltrap, (struct trap *));
  265. X  E struct trap *FDECL(t_at, (int,int));
  266. X*** include.old/patchlevel.h    Tue Jun 26 09:31:19 1990
  267. X--- include/patchlevel.h    Tue Jun 26 10:00:25 1990
  268. X***************
  269. X*** 97,100 ****
  270. X   *  and a number of simple fixes and consistency extensions
  271. X   */
  272. X  
  273. X! #define PATCHLEVEL    8
  274. X--- 97,107 ----
  275. X   *  and a number of simple fixes and consistency extensions
  276. X   */
  277. X  
  278. X! /*
  279. X!  *  Patch 9, June 26, 1990
  280. X!  *  clear up some confusing documentation
  281. X!  *  smooth some more rough edges in various ports
  282. X!  *  and fix a couple more bugs
  283. X!  */
  284. X! 
  285. X! #define PATCHLEVEL    9
  286. X*** include.old/system.h    Tue Jun 26 09:31:19 1990
  287. X--- include/system.h    Tue Jun 26 09:36:49 1990
  288. X***************
  289. X*** 254,260 ****
  290. X  # define Vsprintf (void) vsprintf
  291. X  #endif
  292. X  
  293. X! #ifdef TOS
  294. X  E int FDECL(tgetent, (const char *,const char *));
  295. X  E int FDECL(tgetnum, (const char *));
  296. X  E int FDECL(tgetflag, (const char *));
  297. X--- 254,260 ----
  298. X  # define Vsprintf (void) vsprintf
  299. X  #endif
  300. X  
  301. X! #ifdef MSDOS
  302. X  E int FDECL(tgetent, (const char *,const char *));
  303. X  E int FDECL(tgetnum, (const char *));
  304. X  E int FDECL(tgetflag, (const char *));
  305. X*** include.old/vault.h    Tue Jun 26 09:31:20 1990
  306. X--- include/vault.h    Tue Jun 26 09:36:49 1990
  307. X***************
  308. X*** 16,21 ****
  309. X--- 16,22 ----
  310. X      xchar ogx, ogy;        /* guard's last position */
  311. X      xchar gdlevel;        /* level guard was created on */
  312. X      xchar warncnt;        /* number of warnings to follow */
  313. X+     int vroom;        /* room number of the vault */
  314. X      unsigned gddone:1;
  315. X      struct fakecorridor fakecorr[FCSIZ];
  316. X  };
  317. X*** mac.old/mac.c    Tue Jun 26 09:31:29 1990
  318. X--- mac/mac.c    Tue Jun 26 09:36:47 1990
  319. X***************
  320. X*** 1116,1122 ****
  321. X  #define    MORE_INFO_BUTTON    2
  322. X  
  323. X      DialogPtr    theDialog;
  324. X-     DialogRecord    space;
  325. X      Rect    rect;
  326. X      Handle    theControl;
  327. X      short    type,itemHit;
  328. X--- 1116,1121 ----
  329. X***************
  330. X*** 1131,1137 ****
  331. X      }
  332. X  
  333. X      GetPort(&oldPort);
  334. X!     theDialog = GetNewDialog(129, &space,(WindowPtr)-1);
  335. X      if (!prompt) {
  336. X          HideDItem(theDialog, OK_BUTTON);
  337. X          HideDItem(theDialog, MORE_INFO_BUTTON);
  338. X--- 1130,1136 ----
  339. X      }
  340. X  
  341. X      GetPort(&oldPort);
  342. X!     theDialog = GetNewDialog(129, (Ptr)NULL,(WindowPtr)-1);
  343. X      if (!prompt) {
  344. X          HideDItem(theDialog, OK_BUTTON);
  345. X          HideDItem(theDialog, MORE_INFO_BUTTON);
  346. X*** others.old/Makefile.ovl    Tue Jun 26 09:31:37 1990
  347. X--- others/Makefile.ovl    Tue Jun 26 09:36:50 1990
  348. X***************
  349. X*** 61,68 ****
  350. X  #
  351. X  ###############################################################################
  352. X  # Use the first line if you are using EXESMURF or the second for EXEMOD.
  353. X! EXEFLAGS = /max3000 /min3000
  354. X! # EXEFLAGS = /max BB8 /min BB8
  355. X  ###############################################################################
  356. X  #
  357. X  # *****************************************************************************
  358. X--- 61,68 ----
  359. X  #
  360. X  ###############################################################################
  361. X  # Use the first line if you are using EXESMURF or the second for EXEMOD.
  362. X! EXEFLAGS = /max4500 /min4500
  363. X! # EXEFLAGS = /max 1194 /min 1194
  364. X  ###############################################################################
  365. X  #
  366. X  # *****************************************************************************
  367. X*** others.old/NetHack.cnf    Tue Jun 26 09:31:37 1990
  368. X--- others/NetHack.cnf    Tue Jun 26 09:36:46 1990
  369. X***************
  370. X*** 70,76 ****
  371. X  #
  372. X  # If you merely set the IBMgraphics option as above, NetHack will use IBM
  373. X  # extended ASCII for dungeon characters.  If you don't like the selections,
  374. X! # you can make up your own via the graphics option (and not set IBMgraphics).
  375. X  #
  376. X  # An example using the IBM graphics character set:
  377. X  #       ' '  |   -   .   .   `   '   -   -   -   -   -   |   -   \   /   .   -   |   +   .   #   <   >   ^   "   }   {   #   \   _   <   >   #   #
  378. X--- 70,78 ----
  379. X  #
  380. X  # If you merely set the IBMgraphics option as above, NetHack will use IBM
  381. X  # extended ASCII for dungeon characters.  If you don't like the selections,
  382. X! # you can make up your own via the graphics option, but you should still set
  383. X! # IBMgraphics if you are using IBM graphics characters to get the correct
  384. X! # processing.
  385. X  #
  386. X  # An example using the IBM graphics character set:
  387. X  #       ' '  |   -   .   .   `   '   -   -   -   -   -   |   -   \   /   .   -   |   +   .   #   <   >   ^   "   }   {   #   \   _   <   >   #   #
  388. X***************
  389. X*** 86,91 ****
  390. X  # (aka ANSI ruling character set '0') for dungeon characters.  If you don't
  391. X  # like the selections, you can make up your own via the graphics option,
  392. X  # adding 128 to the value of any line-drawing character you want to use.
  393. X! # (In such a case, do not set DECgraphics.)
  394. X  #
  395. X  #GRAPHICS= 032 248 241 236 235 237 234 238 246 247 245 244 248 241 092 047 254 241 248 043 254 225
  396. X--- 88,93 ----
  397. X  # (aka ANSI ruling character set '0') for dungeon characters.  If you don't
  398. X  # like the selections, you can make up your own via the graphics option,
  399. X  # adding 128 to the value of any line-drawing character you want to use.
  400. X! # (But you should still set DECgraphics to get the correct processing.)
  401. X  #
  402. X  #GRAPHICS= 032 248 241 236 235 237 234 238 246 247 245 244 248 241 092 047 254 241 248 043 254 225
  403. X*** others.old/msdos.c    Tue Jun 26 09:31:37 1990
  404. X--- others/msdos.c    Tue Jun 26 09:36:32 1990
  405. X***************
  406. X*** 1411,1416 ****
  407. X--- 1411,1418 ----
  408. X      char *s;
  409. X      static char newhe[] = "\033q\033b\017\033c0";
  410. X  
  411. X+     if (!flags.IBMBIOS)
  412. X+         return;
  413. X      init_aline();
  414. X      numcolors = 1 << (((unsigned char *) _a_line)[1]);
  415. X      if (numcolors == 2) {            /* mono */
  416. X*** src.old/apply.c    Tue Jun 26 09:31:43 1990
  417. X--- src/apply.c    Tue Jun 26 09:36:26 1990
  418. X***************
  419. X*** 1182,1187 ****
  420. X--- 1182,1189 ----
  421. X          return;
  422. X      }
  423. X      if(can = mksobj(TIN,FALSE)) {
  424. X+         int savequan;
  425. X+ 
  426. X          can->corpsenm = corpse->corpsenm;
  427. X          can->quan = 1; /*Defeat the occasional creation of pairs of tins */
  428. X          can->owt = weight(can);
  429. X***************
  430. X*** 1190,1199 ****
  431. X          can->cursed = obj->cursed;
  432. X          can->blessed = obj->blessed;
  433. X          can = addinv(can);
  434. X!         You("now have %s.", doname(can));
  435. X          if (carried(corpse)) useup(corpse);
  436. X          else useupf(corpse);
  437. X!     } else pline("Tinning failed.");
  438. X  }
  439. X  
  440. X  int
  441. X--- 1192,1211 ----
  442. X          can->cursed = obj->cursed;
  443. X          can->blessed = obj->blessed;
  444. X          can = addinv(can);
  445. X!         savequan = can->quan;
  446. X!         can->quan = 1;
  447. X!         if (inv_cnt() <= 52) {
  448. X!         prinv(can);
  449. X!         can->quan = savequan;
  450. X!         } else {
  451. X!         pline("You make, but cannot pick up, %s.", doname(can));
  452. X!         /* can->quan = savequan; */
  453. X!         /* unnecessary since savequan = quan = 1 here */
  454. X!         dropx(can);
  455. X!         }
  456. X          if (carried(corpse)) useup(corpse);
  457. X          else useupf(corpse);
  458. X!     } else impossible("Tinning failed.");
  459. X  }
  460. X  
  461. X  int
  462. X*** src.old/dokick.c    Tue Jun 26 09:31:44 1990
  463. X--- src/dokick.c    Tue Jun 26 09:36:40 1990
  464. X***************
  465. X*** 374,386 ****
  466. X          if (!kickobj->olocked && (!rn2(3) ||
  467. X                      (martial() && !rn2(2)))) {
  468. X              pline("The lid slams open, then falls shut.");
  469. X!             if(otrp) chest_trap(kickobj, LEG);
  470. X              return(1);
  471. X          } else if (kickobj->olocked && 
  472. X                  (!rn2(5) || (martial() && !rn2(2)))) {
  473. X              You("break open the lock!");
  474. X              kickobj->olocked = 0;
  475. X!                 if(otrp) chest_trap(kickobj, LEG);
  476. X              return(1);
  477. X          }
  478. X          /* let it fall through to the next cases... */
  479. X--- 374,386 ----
  480. X          if (!kickobj->olocked && (!rn2(3) ||
  481. X                      (martial() && !rn2(2)))) {
  482. X              pline("The lid slams open, then falls shut.");
  483. X!             if(otrp) (void) chest_trap(kickobj, LEG);
  484. X              return(1);
  485. X          } else if (kickobj->olocked && 
  486. X                  (!rn2(5) || (martial() && !rn2(2)))) {
  487. X              You("break open the lock!");
  488. X              kickobj->olocked = 0;
  489. X!                 if(otrp) (void) chest_trap(kickobj, LEG);
  490. X              return(1);
  491. X          }
  492. X          /* let it fall through to the next cases... */
  493. X*** src.old/end.c    Tue Jun 26 09:31:45 1990
  494. X--- src/end.c    Tue Jun 26 09:36:31 1990
  495. X***************
  496. X*** 194,200 ****
  497. X      (void) puts(" Suddenly, the dungeon collapses.");
  498. X  #if defined(WIZARD) && !defined(MSDOS)
  499. X      if(!wizard) {
  500. X!         pline("Report error to %s and it may be possible to rebuild.",WIZARD);
  501. X          more();
  502. X      }
  503. X  #ifdef VMS
  504. X--- 194,205 ----
  505. X      (void) puts(" Suddenly, the dungeon collapses.");
  506. X  #if defined(WIZARD) && !defined(MSDOS)
  507. X      if(!wizard) {
  508. X!         pline("Report error to %s and it may be possible to rebuild.",
  509. X! # ifdef WIZARD_NAME    /*(KR1ED)*/
  510. X!         WIZARD_NAME);
  511. X! # else
  512. X!         WIZARD);
  513. X! # endif
  514. X          more();
  515. X      }
  516. X  #ifdef VMS
  517. X***************
  518. X*** 641,650 ****
  519. X--- 646,668 ----
  520. X  #  if defined(UNIX) || defined(VMS)
  521. X      (void) signal(SIGHUP,SIG_IGN);
  522. X  #  endif
  523. X+ #  ifdef MACOS
  524. X+     Str255 fileName;
  525. X+     int oldVolume;
  526. X+     struct term_info *t;
  527. X+     extern WindowPtr HackWindow;
  528. X+ 
  529. X+     t = (term_info *)GetWRefCon(HackWindow);
  530. X+     (void)GetVol(&fileName, &oldVolume);
  531. X+     (void)SetVol(0L, t->system.sysVRefNum);
  532. X+ #  endif
  533. X      for(x = maxdlevel; x >= 0; x--) {
  534. X          glo(x);
  535. X          (void) unlink(lock);    /* not all levels need be present */
  536. X      }
  537. X+ #  ifdef MACOS
  538. X+     (void)SetVol(0L, oldVolume);
  539. X+ #  endif
  540. X  # endif
  541. X  #endif
  542. X  }
  543. X*** src.old/hack.c    Tue Jun 26 09:31:45 1990
  544. X--- src/hack.c    Tue Jun 26 09:36:33 1990
  545. X***************
  546. X*** 1122,1128 ****
  547. X          if (u.usym==S_NYMPH) carrcap = MAX_CARR_CAP;
  548. X          else if (!uasmon->cwt)
  549. X              carrcap = (carrcap * uasmon->mlevel * 6)/45;
  550. X!         else carrcap = (carrcap * uasmon->cwt / 45);
  551. X      }
  552. X  #endif
  553. X      if(Levitation)             /* pugh@cornell */
  554. X--- 1122,1130 ----
  555. X          if (u.usym==S_NYMPH) carrcap = MAX_CARR_CAP;
  556. X          else if (!uasmon->cwt)
  557. X              carrcap = (carrcap * uasmon->mlevel * 6)/45;
  558. X!         else if (!strongmonst(uasmon)
  559. X!             || (strongmonst(uasmon) && (uasmon->cwt > 45)))
  560. X!             carrcap = (carrcap * uasmon->cwt / 45);
  561. X      }
  562. X  #endif
  563. X      if(Levitation)             /* pugh@cornell */
  564. X*** src.old/lock.c    Tue Jun 26 09:31:46 1990
  565. X--- src/lock.c    Tue Jun 26 09:36:41 1990
  566. X***************
  567. X*** 76,82 ****
  568. X            (!xlock.box->olocked) ? "lock" :
  569. X            (xlock.picktyp == LOCK_PICK) ? "pick" : "open" );
  570. X          xlock.box->olocked = !xlock.box->olocked;
  571. X!         if(xlock.box->otrapped)    chest_trap(xlock.box, FINGER);
  572. X      }
  573. X      return((xlock.usedtime = 0));
  574. X  }
  575. X--- 76,83 ----
  576. X            (!xlock.box->olocked) ? "lock" :
  577. X            (xlock.picktyp == LOCK_PICK) ? "pick" : "open" );
  578. X          xlock.box->olocked = !xlock.box->olocked;
  579. X!         if(xlock.box->otrapped)    
  580. X!         (void) chest_trap(xlock.box, FINGER);
  581. X      }
  582. X      return((xlock.usedtime = 0));
  583. X  }
  584. X*** src.old/mail.c    Tue Jun 26 09:31:47 1990
  585. X--- src/mail.c    Tue Jun 26 09:36:28 1990
  586. X***************
  587. X*** 227,236 ****
  588. X  
  589. X  static void
  590. X  newmail() {
  591. X      /* deliver a scroll of mail */
  592. X      register boolean invload =
  593. X          ((inv_weight() + (int)objects[SCR_MAIL].oc_weight) > 0 ||
  594. X!              inv_cnt() >= 52 || Fumbling);
  595. X      register struct monst *md = makemon(&mons[PM_MAIL_DAEMON], u.ux, u.uy);
  596. X  
  597. X      if(!md)    return;
  598. X--- 227,237 ----
  599. X  
  600. X  static void
  601. X  newmail() {
  602. X+     struct obj *obj;
  603. X      /* deliver a scroll of mail */
  604. X      register boolean invload =
  605. X          ((inv_weight() + (int)objects[SCR_MAIL].oc_weight) > 0 ||
  606. X!              Fumbling);
  607. X      register struct monst *md = makemon(&mons[PM_MAIL_DAEMON], u.ux, u.uy);
  608. X  
  609. X      if(!md)    return;
  610. X***************
  611. X*** 251,265 ****
  612. X      if(dist(md->mx,md->my) > 2)
  613. X          verbalize("Catch!");
  614. X      more();
  615. X!     if(invload) {
  616. X!         struct obj *obj = mksobj_at(SCR_MAIL,u.ux,u.uy);
  617. X!         obj->known = obj->dknown = TRUE;
  618. X!         makeknown(SCR_MAIL);
  619. X          stackobj(fobj);        
  620. X          verbalize("Oops!");
  621. X      } else {
  622. X!         /* set known and do prinv() */
  623. X!         (void) identify(addinv(mksobj(SCR_MAIL,FALSE)));
  624. X      }
  625. X  # endif /* NO_MAILREADER */
  626. X  
  627. X--- 252,271 ----
  628. X      if(dist(md->mx,md->my) > 2)
  629. X          verbalize("Catch!");
  630. X      more();
  631. X!     obj = mksobj(SCR_MAIL, FALSE);
  632. X!     obj->known = obj->dknown = TRUE;
  633. X!     makeknown(SCR_MAIL);
  634. X!     if (!invload) obj = addinv(obj);
  635. X!     if(invload || inv_cnt() > 52) {
  636. X!         if (invload) dropy(obj);
  637. X!         else dropx(obj);
  638. X          stackobj(fobj);        
  639. X          verbalize("Oops!");
  640. X      } else {
  641. X!         int savequan = obj->quan;
  642. X!         obj->quan = 1;
  643. X!         prinv(obj);
  644. X!         obj->quan = savequan;
  645. X      }
  646. X  # endif /* NO_MAILREADER */
  647. X  
  648. X*** src.old/makemon.c    Tue Jun 26 09:31:47 1990
  649. X--- src/makemon.c    Tue Jun 26 09:36:22 1990
  650. X***************
  651. X*** 201,209 ****
  652. X              (void)mongets(mtmp, IRON_SHOES);
  653. X              if (rn2(4) == 0) {
  654. X              (void)mongets(mtmp, SHORT_SWORD);
  655. X!             (void)mongets(mtmp,
  656. X!                 (rn2(3) == 0) ? AXE : TWO_HANDED_SWORD);
  657. X!             (void)mongets(mtmp, LARGE_SHIELD);
  658. X              if (rn2(3) == 0)
  659. X                  (void)mongets(mtmp, DWARVISH_MITHRIL_COAT);
  660. X              } else {
  661. X--- 201,211 ----
  662. X              (void)mongets(mtmp, IRON_SHOES);
  663. X              if (rn2(4) == 0) {
  664. X              (void)mongets(mtmp, SHORT_SWORD);
  665. X!             if (rn2(2)) (void)mongets(mtmp, TWO_HANDED_SWORD);
  666. X!             else {
  667. X!                 (void)mongets(mtmp, AXE);
  668. X!                 (void)mongets(mtmp, LARGE_SHIELD);
  669. X!             }
  670. X              if (rn2(3) == 0)
  671. X                  (void)mongets(mtmp, DWARVISH_MITHRIL_COAT);
  672. X              } else {
  673. X***************
  674. X*** 716,722 ****
  675. X      if (x == u.ux && y == u.uy) return 0;
  676. X      if (mdat) {
  677. X          if (IS_POOL(levl[x][y].typ))
  678. X!         if (mdat == &playermon && HLevitation)    return 1;
  679. X          else    return (is_flyer(mdat) || is_swimmer(mdat));
  680. X          if (passes_walls(mdat)) return 1;
  681. X      }
  682. X--- 718,725 ----
  683. X      if (x == u.ux && y == u.uy) return 0;
  684. X      if (mdat) {
  685. X          if (IS_POOL(levl[x][y].typ))
  686. X!         if (mdat == &playermon && (HLevitation || Wwalking))
  687. X!             return 1;
  688. X          else    return (is_flyer(mdat) || is_swimmer(mdat));
  689. X          if (passes_walls(mdat)) return 1;
  690. X      }
  691. X*** src.old/mhitu.c    Tue Jun 26 09:31:47 1990
  692. X--- src/mhitu.c    Tue Jun 26 09:36:27 1990
  693. X***************
  694. X*** 1127,1133 ****
  695. X          kludge("%s engulfs you!", Monnam(mtmp));
  696. X          stop_occupation();
  697. X          if (u.utrap) {
  698. X!             You("are released from the trap!");
  699. X              u.utrap = 0;
  700. X          }
  701. X  #ifdef WALKIES
  702. X--- 1127,1134 ----
  703. X          kludge("%s engulfs you!", Monnam(mtmp));
  704. X          stop_occupation();
  705. X          if (u.utrap) {
  706. X!             You("are released from the %s!",
  707. X!                 u.utraptype==TT_WEB ? "web" : "trap");
  708. X              u.utrap = 0;
  709. X          }
  710. X  #ifdef WALKIES
  711. X*** src.old/mon.c    Tue Jun 26 09:31:49 1990
  712. X--- src/mon.c    Tue Jun 26 09:36:35 1990
  713. X***************
  714. X*** 499,506 ****
  715. X       * and human weights (weight of a human=45).  Limits for corpseless
  716. X       * monsters are arbitrary.
  717. X       */
  718. X!     maxload = (mtmp->data->cwt ? mtmp->data->cwt : mtmp->data->mlevel*6)
  719. X!         * MAX_CARR_CAP / 45;
  720. X      if (!strongmonst(mtmp->data)) maxload /= 2;
  721. X  
  722. X      return maxload;
  723. X--- 499,511 ----
  724. X       * and human weights (weight of a human=45).  Limits for corpseless
  725. X       * monsters are arbitrary.
  726. X       */
  727. X!     if (!mtmp->data->cwt)
  728. X!         maxload = MAX_CARR_CAP * (mtmp->data->mlevel * 6) / 45;
  729. X!     else if (!strongmonst(mtmp->data)
  730. X!         || (strongmonst(mtmp->data) && (mtmp->data->cwt > 45)))
  731. X!         maxload = MAX_CARR_CAP * mtmp->data->cwt / 45;
  732. X!     else    maxload = MAX_CARR_CAP;    /* strong monsters w/ cwt <= 45 */
  733. X! 
  734. X      if (!strongmonst(mtmp->data)) maxload /= 2;
  735. X  
  736. X      return maxload;
  737. X*** src.old/monst.c    Tue Jun 26 09:31:48 1990
  738. X--- src/monst.c    Tue Jun 26 09:36:37 1990
  739. X***************
  740. X*** 869,887 ****
  741. X  #ifdef KOPS
  742. X      { "Keystone Kop", S_KOP, 1, 6, 7, 10, 9, (G_GENO | G_LGROUP | G_NOGEN),
  743. X        { { AT_WEAP, AD_PHYS, 1, 4 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  744. X!       20, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  745. X        M2_HUMAN | M2_WANDER | M2_HOSTILE, C(BLUE) },
  746. X      { "Kop Sergeant", S_KOP, 2, 8, 6, 10, 10, (G_GENO | G_SGROUP | G_NOGEN),
  747. X        { { AT_WEAP, AD_PHYS, 1, 6 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  748. X!       20, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  749. X        M2_HUMAN | M2_WANDER | M2_HOSTILE | M2_STRONG, C(BLUE) },
  750. X      { "Kop Lieutenant", S_KOP, 3, 10, 5, 20, 11, (G_GENO | G_NOGEN),
  751. X        { { AT_WEAP, AD_PHYS, 1, 8 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  752. X!       20, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  753. X        M2_HUMAN | M2_WANDER | M2_HOSTILE | M2_STRONG, C(CYAN) },
  754. X      { "Kop Kaptain", S_KOP, 4, 12, 4, 20, 12, (G_GENO | G_NOGEN),
  755. X        { { AT_WEAP, AD_PHYS, 2, 6 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  756. X!       20, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  757. X        M2_HUMAN | M2_WANDER | M2_HOSTILE | M2_STRONG, C(HI_LORD) },
  758. X  #endif
  759. X  /*    Liches     */
  760. X--- 869,887 ----
  761. X  #ifdef KOPS
  762. X      { "Keystone Kop", S_KOP, 1, 6, 7, 10, 9, (G_GENO | G_LGROUP | G_NOGEN),
  763. X        { { AT_WEAP, AD_PHYS, 1, 4 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  764. X!       45, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  765. X        M2_HUMAN | M2_WANDER | M2_HOSTILE, C(BLUE) },
  766. X      { "Kop Sergeant", S_KOP, 2, 8, 6, 10, 10, (G_GENO | G_SGROUP | G_NOGEN),
  767. X        { { AT_WEAP, AD_PHYS, 1, 6 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  768. X!       45, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  769. X        M2_HUMAN | M2_WANDER | M2_HOSTILE | M2_STRONG, C(BLUE) },
  770. X      { "Kop Lieutenant", S_KOP, 3, 10, 5, 20, 11, (G_GENO | G_NOGEN),
  771. X        { { AT_WEAP, AD_PHYS, 1, 8 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  772. X!       45, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  773. X        M2_HUMAN | M2_WANDER | M2_HOSTILE | M2_STRONG, C(CYAN) },
  774. X      { "Kop Kaptain", S_KOP, 4, 12, 4, 20, 12, (G_GENO | G_NOGEN),
  775. X        { { AT_WEAP, AD_PHYS, 2, 6 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  776. X!       45, 200, 0, MS_ARREST, MZ_HUMAN, M1_HUMANOID | M1_COLLECT,
  777. X        M2_HUMAN | M2_WANDER | M2_HOSTILE | M2_STRONG, C(HI_LORD) },
  778. X  #endif
  779. X  /*    Liches     */
  780. X*** src.old/options.c    Tue Jun 26 09:31:49 1990
  781. X--- src/options.c    Tue Jun 26 09:36:48 1990
  782. X***************
  783. X*** 687,693 ****
  784. X      unsigned num;
  785. X      char *op;
  786. X      char tmp_name[256];
  787. X-     DialogRecord    dlgR;
  788. X      DialogPtr optionDlg;
  789. X      DialogTHndl    th, centreDlgBox();
  790. X      boolean done = FALSE;
  791. X--- 687,692 ----
  792. X***************
  793. X*** 713,719 ****
  794. X      
  795. X      th = centreDlgBox(130, FALSE);
  796. X  
  797. X!     optionDlg = GetNewDialog(130, (Ptr)&dlgR, (WindowPtr)-1);
  798. X  /* set initial values of text items */
  799. X      ITEMTEXT(PLAYER_NAME,plname);
  800. X      if(*dogname) ITEMTEXT(DOG_NAME,dogname);
  801. X--- 712,718 ----
  802. X      
  803. X      th = centreDlgBox(130, FALSE);
  804. X  
  805. X!     optionDlg = GetNewDialog(130, (Ptr)NULL, (WindowPtr)-1);
  806. X  /* set initial values of text items */
  807. X      ITEMTEXT(PLAYER_NAME,plname);
  808. X      if(*dogname) ITEMTEXT(DOG_NAME,dogname);
  809. X*** src.old/pickup.c    Tue Jun 26 09:31:50 1990
  810. X--- src/pickup.c    Tue Jun 26 09:36:42 1990
  811. X***************
  812. X*** 325,331 ****
  813. X  int
  814. X  doloot() {    /* loot a container on the floor. */
  815. X  
  816. X!     register struct obj *cobj;
  817. X      register int c;
  818. X  
  819. X      if (Levitation) {
  820. X--- 325,331 ----
  821. X  int
  822. X  doloot() {    /* loot a container on the floor. */
  823. X  
  824. X!     register struct obj *cobj, *nobj;
  825. X      register int c;
  826. X  
  827. X      if (Levitation) {
  828. X***************
  829. X*** 332,338 ****
  830. X          You("cannot reach the floor.");
  831. X          return(0);
  832. X      }
  833. X!     for(cobj = level.objects[u.ux][u.uy]; cobj; cobj = cobj->nexthere) {
  834. X          if(Is_container(cobj)) {
  835. X  
  836. X              pline("There is %s here, loot it? ", doname(cobj));
  837. X--- 332,340 ----
  838. X          You("cannot reach the floor.");
  839. X          return(0);
  840. X      }
  841. X!     for(cobj = level.objects[u.ux][u.uy]; cobj; cobj = nobj) {
  842. X!             nobj = cobj->nexthere;
  843. X! 
  844. X          if(Is_container(cobj)) {
  845. X  
  846. X              pline("There is %s here, loot it? ", doname(cobj));
  847. X***************
  848. X*** 355,361 ****
  849. X              }
  850. X  
  851. X              You("carefully open the %s...", xname(cobj));
  852. X!             if(cobj->otrapped) chest_trap(cobj, FINGER);
  853. X              if(multi < 0) return 0; /* a paralysis trap */
  854. X  
  855. X              use_container(cobj, 0);
  856. X--- 357,364 ----
  857. X              }
  858. X  
  859. X              You("carefully open the %s...", xname(cobj));
  860. X!             if(cobj->otrapped && chest_trap(cobj, FINGER)) /* don't use obj if obj dies */
  861. X!               continue;
  862. X              if(multi < 0) return 0; /* a paralysis trap */
  863. X  
  864. X              use_container(cobj, 0);
  865. X*** src.old/restore.c    Tue Jun 26 09:31:52 1990
  866. X--- src/restore.c    Tue Jun 26 09:36:47 1990
  867. X***************
  868. X*** 269,274 ****
  869. X--- 269,277 ----
  870. X  #ifdef TEXTCOLOR
  871. X      flags.use_color = oldflags.use_color;
  872. X  #endif
  873. X+     /* these come from the current environment; ignore saved values */
  874. X+     flags.echo = oldflags.echo;
  875. X+     flags.cbreak = oldflags.cbreak;
  876. X  
  877. X      mread(fd, (genericptr_t) &dlevel, sizeof dlevel);
  878. X      mread(fd, (genericptr_t) &maxdlevel, sizeof maxdlevel);
  879. X***************
  880. X*** 882,887 ****
  881. X--- 885,899 ----
  882. X          }
  883. X      }
  884. X  #endif
  885. X+     if(ghostly && lev > medusa_level && lev < stronghold_level &&
  886. X+                         xdnstair == 0) {
  887. X+         coord cc;
  888. X+ 
  889. X+         mazexy(&cc);
  890. X+         xdnstair = cc.x;
  891. X+         ydnstair = cc.y;
  892. X+         levl[cc.x][cc.y].typ = STAIRS;
  893. X+     }
  894. X  }
  895. X  
  896. X  #ifdef ZEROCOMP
  897. X*** src.old/termcap.c    Tue Jun 26 09:31:53 1990
  898. X--- src/termcap.c    Tue Jun 26 09:36:32 1990
  899. X***************
  900. X*** 196,202 ****
  901. X          /* strictly, SE should be 2, and UE should be 24,
  902. X             but we can't trust all ANSI emulators to be
  903. X             that complete.  -3. */
  904. X! #   if !defined(MSDOS) || defined(TERMLIB)
  905. X          AS = "\016";
  906. X          AE = "\017";
  907. X  #   endif
  908. X--- 196,202 ----
  909. X          /* strictly, SE should be 2, and UE should be 24,
  910. X             but we can't trust all ANSI emulators to be
  911. X             that complete.  -3. */
  912. X! #   if !defined(MSDOS) || (defined(TERMLIB) && defined(AMIGA))
  913. X          AS = "\016";
  914. X          AE = "\017";
  915. X  #   endif
  916. X***************
  917. X*** 336,341 ****
  918. X--- 336,345 ----
  919. X      free((genericptr_t)tptr);
  920. X  # ifdef TEXTCOLOR
  921. X      init_hilite();
  922. X+ #  if defined(TOS) && defined(__GNUC__)
  923. X+     if (!strcmp(term, "builtin"))
  924. X+         HE="\033q\033b3\033c0";    /* to turn off colors, too */
  925. X+ #  endif
  926. X  # endif
  927. X  #endif /* TERMLIB */
  928. X  }
  929. X***************
  930. X*** 769,775 ****
  931. X  {
  932. X  #  ifdef TOS
  933. X      int c;
  934. X-     static char unhilite[] = "\033q\033b3\033c0";
  935. X  #  else
  936. X      int backg = BLACK, foreg = WHITE, len;
  937. X      register int c, color;
  938. X--- 773,778 ----
  939. X***************
  940. X*** 789,795 ****
  941. X      hilites[ORANGE_COLORED] = "\033b3\033c1";
  942. X      hilites[YELLOW] = "\033b1\033c3";
  943. X      hilites[WHITE] = "\033b0\033c3";
  944. X-     HE = unhilite;    /* to turn off the color stuff too */
  945. X  #  else /* TOS */
  946. X      /* find the background color, HI[len] == 'm' */
  947. X      len = strlen(HI) - 1;
  948. X--- 792,797 ----
  949. X*** src.old/trap.c    Tue Jun 26 09:31:54 1990
  950. X--- src/trap.c    Tue Jun 26 09:36:40 1990
  951. X***************
  952. X*** 1586,1592 ****
  953. X                                  : u.ulevel;
  954. X                  if(confused || Fumbling || rnd(75+dlevel/2) > ch) {
  955. X                  You("set it off!");
  956. X!                 chest_trap(otmp, FINGER);
  957. X                  } else {
  958. X                  You("disarm it!");
  959. X                  otmp->otrapped = 0;
  960. X--- 1586,1592 ----
  961. X                                  : u.ulevel;
  962. X                  if(confused || Fumbling || rnd(75+dlevel/2) > ch) {
  963. X                  You("set it off!");
  964. X!                 (void) chest_trap(otmp, FINGER);
  965. X                  } else {
  966. X                  You("disarm it!");
  967. X                  otmp->otrapped = 0;
  968. X***************
  969. X*** 1649,1655 ****
  970. X  }
  971. X  
  972. X  /* only called when the player is doing something to the chest directly */
  973. X! void
  974. X  chest_trap(obj, bodypart)
  975. X  register struct obj *obj;
  976. X  register int bodypart;
  977. X--- 1649,1655 ----
  978. X  }
  979. X  
  980. X  /* only called when the player is doing something to the chest directly */
  981. X! boolean
  982. X  chest_trap(obj, bodypart)
  983. X  register struct obj *obj;
  984. X  register int bodypart;
  985. X***************
  986. X*** 1657,1663 ****
  987. X      register struct obj *otmp,*otmp2;
  988. X      char    buf[80];
  989. X  
  990. X!     if(Luck > -13 && rn2(13+Luck) > 7) return;
  991. X  
  992. X      otmp = obj;
  993. X      switch(rn2(20) ? ((Luck >= 13) ? 0 : rn2(13-Luck)) : rn2(26)) {
  994. X--- 1657,1663 ----
  995. X      register struct obj *otmp,*otmp2;
  996. X      char    buf[80];
  997. X  
  998. X!     if(Luck > -13 && rn2(13+Luck) > 7) return FALSE;
  999. X  
  1000. X      otmp = obj;
  1001. X      switch(rn2(20) ? ((Luck >= 13) ? 0 : rn2(13-Luck)) : rn2(26)) {
  1002. X***************
  1003. X*** 1678,1684 ****
  1004. X  
  1005. X              losehp(d(6,6), buf, KILLED_BY_AN);
  1006. X              wake_nearby();
  1007. X!             return;
  1008. X          case 20:
  1009. X          case 19:
  1010. X          case 18:
  1011. X--- 1678,1684 ----
  1012. X  
  1013. X              losehp(d(6,6), buf, KILLED_BY_AN);
  1014. X              wake_nearby();
  1015. X!             return TRUE;
  1016. X          case 20:
  1017. X          case 19:
  1018. X          case 18:
  1019. X***************
  1020. X*** 1746,1751 ****
  1021. X--- 1746,1753 ----
  1022. X      }
  1023. X      bot();             /* to get immediate botl re-display */
  1024. X      otmp->otrapped = 0;        /* these traps are one-shot things */
  1025. X+ 
  1026. X+     return FALSE;
  1027. X  }
  1028. X  
  1029. X  #endif /* OVLB */
  1030. X*** src.old/uhitm.c    Tue Jun 26 09:31:54 1990
  1031. X--- src/uhitm.c    Tue Jun 26 09:36:27 1990
  1032. X***************
  1033. X*** 748,754 ****
  1034. X          case AD_SITM:
  1035. X          if(mdef->minvent) {
  1036. X              struct obj *otmp, *addinv(), *stealoid;
  1037. X-             int isize = inv_cnt();
  1038. X  
  1039. X              stealoid = (struct obj *)0;
  1040. X              if(is_mercenary(pd) && could_seduce(&youmonst,mdef,mattk)){
  1041. X--- 748,753 ----
  1042. X***************
  1043. X*** 764,786 ****
  1044. X              while(mdef->minvent) {
  1045. X                  otmp = mdef->minvent;
  1046. X                  mdef->minvent = otmp->nobj;
  1047. X                  if (!stolen && otmp==stealoid) {
  1048. X!                     if(isize < 52) {
  1049. X!                         otmp = addinv(otmp);
  1050. X!                         /* might not increase isize */
  1051. X!                         isize = inv_cnt();
  1052. X!                     } else dropy(otmp);
  1053. X                      stealoid = otmp;
  1054. X                      stolen = TRUE;
  1055. X                  } else {
  1056. X!                     if(isize < 52) {
  1057. X!                         otmp = addinv(otmp);
  1058. X!                         isize = inv_cnt();
  1059. X                          You("steal: ");
  1060. X                          prinv(otmp);
  1061. X-                     } else {
  1062. X-                         dropy(otmp);
  1063. X-                         You("steal %s.", doname(otmp));
  1064. X                      }
  1065. X                  }
  1066. X              }
  1067. X--- 763,784 ----
  1068. X              while(mdef->minvent) {
  1069. X                  otmp = mdef->minvent;
  1070. X                  mdef->minvent = otmp->nobj;
  1071. X+                 /* set dknown to insure proper merge */
  1072. X+                 if (!Blind) otmp->dknown = 1;
  1073. X                  if (!stolen && otmp==stealoid) {
  1074. X!                     otmp = addinv(otmp);
  1075. X!                     if(inv_cnt() > 52)
  1076. X!                         dropx(otmp);
  1077. X                      stealoid = otmp;
  1078. X                      stolen = TRUE;
  1079. X                  } else {
  1080. X!                     otmp = addinv(otmp);
  1081. X!                     if(inv_cnt() > 52) {
  1082. X!                         dropx(otmp);
  1083. X!                         You("steal %s.", doname(otmp));
  1084. X!                     } else {
  1085. X                          You("steal: ");
  1086. X                          prinv(otmp);
  1087. X                      }
  1088. X                  }
  1089. X              }
  1090. X***************
  1091. X*** 795,810 ****
  1092. X  # endif
  1093. X              }
  1094. X             } else {
  1095. X!                   otmp = mdef->minvent;
  1096. X!                mdef->minvent = otmp->nobj;
  1097. X!                if(isize < 52) {
  1098. X!                 otmp = addinv(otmp);
  1099. X                  You("steal: ");
  1100. X                  prinv(otmp);
  1101. X!                } else {
  1102. X!                 dropy(otmp);
  1103. X!                 You("steal %s.", doname(otmp));
  1104. X!                }
  1105. X             }
  1106. X          }
  1107. X          tmp = 0;
  1108. X--- 793,809 ----
  1109. X  # endif
  1110. X              }
  1111. X             } else {
  1112. X!             otmp = mdef->minvent;
  1113. X!             mdef->minvent = otmp->nobj;
  1114. X!             if (!Blind) otmp->dknown = 1;
  1115. X!             otmp = addinv(otmp);
  1116. X!             if(inv_cnt() > 52) {
  1117. X!                 dropx(otmp);
  1118. X!                 You("steal %s.", doname(otmp));
  1119. X!             } else {
  1120. X                  You("steal: ");
  1121. X                  prinv(otmp);
  1122. X!             }
  1123. X             }
  1124. X          }
  1125. X          tmp = 0;
  1126. X*** src.old/vault.c    Tue Jun 26 09:31:55 1990
  1127. X--- src/vault.c    Tue Jun 26 09:36:50 1990
  1128. X***************
  1129. X*** 168,173 ****
  1130. X--- 168,174 ----
  1131. X      EGD(guard)->ogx = x;
  1132. X      EGD(guard)->ogy = y;
  1133. X      EGD(guard)->gdlevel = dlevel;
  1134. X+     EGD(guard)->vroom = inroom(x, y);
  1135. X      EGD(guard)->warncnt = 0;
  1136. X  
  1137. X      if(!cansee(guard->mx, guard->my)) {
  1138. X***************
  1139. X*** 466,478 ****
  1140. X  void
  1141. X  paygd() {
  1142. X  
  1143. X!     struct monst *guard;
  1144. X!     register int i;
  1145. X      int gx,gy;
  1146. X      char buf[BUFSZ];
  1147. X  
  1148. X!     guard = findgd();
  1149. X!     if (!u.ugold || !guard) return;
  1150. X  
  1151. X      if (u.uinvault) {
  1152. X          Your("%ld zorkmid%s goes into the Magic Memory Vault.",
  1153. X--- 467,477 ----
  1154. X  void
  1155. X  paygd() {
  1156. X  
  1157. X!     register struct monst *grd = findgd();
  1158. X      int gx,gy;
  1159. X      char buf[BUFSZ];
  1160. X  
  1161. X!     if (!u.ugold || !grd) return;
  1162. X  
  1163. X      if (u.uinvault) {
  1164. X          Your("%ld zorkmid%s goes into the Magic Memory Vault.",
  1165. X***************
  1166. X*** 480,500 ****
  1167. X          mkgold(u.ugold, u.ux, u.uy);
  1168. X          u.ugold = 0L;
  1169. X      } else {
  1170. X!         if(guard->mpeaceful) { /* he has no "right" to your gold */
  1171. X!         mongone(guard);
  1172. X          return;
  1173. X          }
  1174. X!         mnexto(guard);
  1175. X!         pmon(guard);
  1176. X!         pline("%s remits your gold to the vault.", Monnam(guard));
  1177. X!         for(i=0; i<=nroom; i++)
  1178. X!         if (rooms[i].rtype==VAULT) break;
  1179. X!         if (i > nroom) {
  1180. X!         impossible("no vault?");
  1181. X!         return;
  1182. X!         }
  1183. X!         gx = rooms[i].lx + rn2(2);
  1184. X!         gy = rooms[i].ly + rn2(2);
  1185. X          mkgold(u.ugold, gx, gy);
  1186. X          u.ugold = 0L;
  1187. X          Sprintf(buf,
  1188. X--- 479,493 ----
  1189. X          mkgold(u.ugold, u.ux, u.uy);
  1190. X          u.ugold = 0L;
  1191. X      } else {
  1192. X!         if(grd->mpeaceful) { /* he has no "right" to your gold */
  1193. X!         mongone(grd);
  1194. X          return;
  1195. X          }
  1196. X!         mnexto(grd);
  1197. X!         pmon(grd);
  1198. X!         pline("%s remits your gold to the vault.", Monnam(grd));
  1199. X!         gx = rooms[EGD(grd)->vroom].lx + rn2(2);
  1200. X!         gy = rooms[EGD(grd)->vroom].ly + rn2(2);
  1201. X          mkgold(u.ugold, gx, gy);
  1202. X          u.ugold = 0L;
  1203. X          Sprintf(buf,
  1204. X***************
  1205. X*** 502,508 ****
  1206. X          player_mon()->mname, plname);
  1207. X          make_engr_at(gx, gy, buf);
  1208. X      }
  1209. X!     mongone(guard);
  1210. X  }
  1211. X  
  1212. X  #ifdef SOUNDS
  1213. X--- 495,501 ----
  1214. X          player_mon()->mname, plname);
  1215. X          make_engr_at(gx, gy, buf);
  1216. X      }
  1217. X!     mongone(grd);
  1218. X  }
  1219. X  
  1220. X  #ifdef SOUNDS
  1221. X*** src.old/zap.c    Tue Jun 26 09:31:56 1990
  1222. X--- src/zap.c    Tue Jun 26 09:36:30 1990
  1223. X***************
  1224. X*** 1730,1736 ****
  1225. X                      destroy_item(POTION_SYM, AD_COLD);
  1226. X                      break;
  1227. X                  case 4:        /* death */
  1228. X!                     if(type == -24) { /* disintegration */
  1229. X                      if (Disint_resistance) {
  1230. X                          You("are not disintegrated.");
  1231. X                          break;
  1232. X--- 1730,1740 ----
  1233. X                      destroy_item(POTION_SYM, AD_COLD);
  1234. X                      break;
  1235. X                  case 4:        /* death */
  1236. X!                     if(type == -24
  1237. X! #ifdef POLYSELF
  1238. X!                     || type == 24
  1239. X! #endif
  1240. X!                         ) { /* disintegration */
  1241. X                      if (Disint_resistance) {
  1242. X                          You("are not disintegrated.");
  1243. X                          break;
  1244. X***************
  1245. X*** 2169,2175 ****
  1246. X      char buf[BUFSZ];
  1247. X      register struct obj *otmp;
  1248. X      unsigned wishquan, mergquan;
  1249. X-     register boolean dropit = (inv_cnt() >= 52);
  1250. X      int tries = 0;
  1251. X  
  1252. X  retry:
  1253. X--- 2173,2178 ----
  1254. X***************
  1255. X*** 2188,2199 ****
  1256. X          return; /* for safety; should never happen */
  1257. X      }
  1258. X      if (otmp != &zeroobj) {
  1259. X!         if(dropit) {
  1260. X              pline("Oops!  The %s to the floor!", aobjnam(otmp, "drop"));
  1261. X!             dropy(otmp);
  1262. X          } else {
  1263. X-             wishquan = otmp->quan;
  1264. X-             otmp = addinv(otmp);
  1265. X              mergquan = otmp->quan;
  1266. X              otmp->quan = wishquan; /* to fool prinv() */
  1267. X              prinv(otmp);
  1268. X--- 2191,2203 ----
  1269. X          return; /* for safety; should never happen */
  1270. X      }
  1271. X      if (otmp != &zeroobj) {
  1272. X!         if (!Blind) otmp->dknown = 1; /* needed for merge to work */
  1273. X!         wishquan = otmp->quan;
  1274. X!         otmp = addinv(otmp);
  1275. X!         if(inv_cnt() > 52) {
  1276. X              pline("Oops!  The %s to the floor!", aobjnam(otmp, "drop"));
  1277. X!             dropx(otmp);
  1278. X          } else {
  1279. X              mergquan = otmp->quan;
  1280. X              otmp->quan = wishquan; /* to fool prinv() */
  1281. X              prinv(otmp);
  1282. X*** vms.old/lev_lex.h    Tue Jun 26 09:32:01 1990
  1283. X--- vms/lev_lex.h    Tue Jun 26 09:36:51 1990
  1284. X***************
  1285. X*** 5,11 ****
  1286. X   * src/lev_main.c, where stdin & stdout are still correctly defined.
  1287. X   */
  1288. X  #ifdef VAXC
  1289. X! # module lev_lex "3.0.8"
  1290. X  #endif
  1291. X  
  1292. X  #include <stdio.h>
  1293. X--- 5,11 ----
  1294. X   * src/lev_main.c, where stdin & stdout are still correctly defined.
  1295. X   */
  1296. X  #ifdef VAXC
  1297. X! # module lev_lex "3.0.9"
  1298. X  #endif
  1299. X  
  1300. X  #include <stdio.h>
  1301. X*** vms.old/vmsbuild.com    Tue Jun 26 09:32:01 1990
  1302. X--- vms/vmsbuild.com    Tue Jun 26 09:36:51 1990
  1303. X***************
  1304. X*** 1,4 ****
  1305. X! $ ! vms/vmsbuild.com -- compile and link NetHack 3.0 patchlevel 8    [pr]
  1306. X  $ !
  1307. X  $ ! usage:
  1308. X  $ !   $ set default [.src]    !or [-.src] if starting from [.vms]
  1309. X--- 1,4 ----
  1310. X! $ ! vms/vmsbuild.com -- compile and link NetHack 3.0 patchlevel 9    [pr]
  1311. X  $ !
  1312. X  $ ! usage:
  1313. X  $ !   $ set default [.src]    !or [-.src] if starting from [.vms]
  1314. X***************
  1315. X*** 121,127 ****
  1316. X  $ cc makedefs.c
  1317. X  $ link makedefs.obj,monst.obj,objects.obj,vmsmisc.obj,-
  1318. X      'vaxcrtl''gnulib',sys$input:/Opt
  1319. X! identification="makedefs 3.0.8"
  1320. X  $ milestone "makedefs"
  1321. X  $! create some build-time files
  1322. X  $ makedefs -p    !pm.h
  1323. X--- 121,127 ----
  1324. X  $ cc makedefs.c
  1325. X  $ link makedefs.obj,monst.obj,objects.obj,vmsmisc.obj,-
  1326. X      'vaxcrtl''gnulib',sys$input:/Opt
  1327. X! identification="makedefs 3.0.9"
  1328. X  $ milestone "makedefs"
  1329. X  $! create some build-time files
  1330. X  $ makedefs -p    !pm.h
  1331. X***************
  1332. X*** 172,178 ****
  1333. X  $ link/Exe=nethack 'nethacklib'/Lib/Incl=(vmsmain,allmain,vmsunix,vmstty,decl),-
  1334. X      sys$disk:[]monst.obj,objects.obj,-    !(data-only modules, like decl)
  1335. X      sys$input:/Opt,'vaxcrtl''gnulib'
  1336. X! identification="NetHack 3.0.8"
  1337. X  $ milestone "NetHack"
  1338. X  $     if c_opt.eq.10 then  goto done    !"LINK" only
  1339. X  $special:
  1340. X--- 172,178 ----
  1341. X  $ link/Exe=nethack 'nethacklib'/Lib/Incl=(vmsmain,allmain,vmsunix,vmstty,decl),-
  1342. X      sys$disk:[]monst.obj,objects.obj,-    !(data-only modules, like decl)
  1343. X      sys$input:/Opt,'vaxcrtl''gnulib'
  1344. X! identification="NetHack 3.0.9"
  1345. X  $ milestone "NetHack"
  1346. X  $     if c_opt.eq.10 then  goto done    !"LINK" only
  1347. X  $special:
  1348. X***************
  1349. X*** 188,194 ****
  1350. X  $ link lev_comp.obj,lev_lex.obj,lev_main.obj,-
  1351. X      monst.obj,objects.obj,alloc.obj,panic.obj,vmsmisc.obj,-
  1352. X      'vaxcrtl''gnulib',sys$input:/Opt
  1353. X! identification="lev_comp 3.0.8"
  1354. X  $ milestone "lev_comp"
  1355. X  $!
  1356. X  $done:
  1357. X--- 188,194 ----
  1358. X  $ link lev_comp.obj,lev_lex.obj,lev_main.obj,-
  1359. X      monst.obj,objects.obj,alloc.obj,panic.obj,vmsmisc.obj,-
  1360. X      'vaxcrtl''gnulib',sys$input:/Opt
  1361. X! identification="lev_comp 3.0.9"
  1362. X  $ milestone "lev_comp"
  1363. X  $!
  1364. X  $done:
  1365. X*** vms.old/vmsmain.c    Tue Jun 26 09:32:01 1990
  1366. X--- vms/vmsmain.c    Tue Jun 26 09:33:01 1990
  1367. X***************
  1368. X*** 14,21 ****
  1369. X  int hackpid = 0;                /* current pid */
  1370. X  int locknum = 0;                /* max num of players */
  1371. X  
  1372. X! static void whoami();
  1373. X! static void byebye();
  1374. X  
  1375. X  int
  1376. X  main(argc,argv)
  1377. X--- 14,25 ----
  1378. X  int hackpid = 0;                /* current pid */
  1379. X  int locknum = 0;                /* max num of players */
  1380. X  
  1381. X! static void NDECL(whoami);
  1382. X! static void NDECL(byebye);
  1383. X! #ifndef SAVE_ON_FATAL_ERROR
  1384. X! static long FDECL(vms_handler,(long [],long []));
  1385. X! #include <ssdef.h>      /* system service status codes */
  1386. X! #endif
  1387. X  
  1388. X  int
  1389. X  main(argc,argv)
  1390. X***************
  1391. X*** 99,104 ****
  1392. X--- 103,112 ----
  1393. X      cls();
  1394. X      u.uhp = 1;    /* prevent RIP on early quits */
  1395. X      u.ux = FAR;    /* prevent nscr() */
  1396. X+ #ifndef SAVE_ON_FATAL_ERROR
  1397. X+     /* used to clear hangup stuff while still giving standard traceback */
  1398. X+     VAXC$ESTABLISH(vms_handler);
  1399. X+ #endif
  1400. X      (void) signal(SIGHUP, (SIG_RET_TYPE) hangup);
  1401. X  
  1402. X      /*
  1403. X***************
  1404. X*** 403,405 ****
  1405. X--- 411,435 ----
  1406. X      (void) chdir(getenv("PATH"));
  1407. X  #endif
  1408. X  }
  1409. X+ 
  1410. X+ #ifndef SAVE_ON_FATAL_ERROR
  1411. X+ /* Condition handler to prevent byebye's hangup simulation
  1412. X+    from saving the game after a fatal error has occurred.  */
  1413. X+ static long
  1414. X+ vms_handler(sigargs, mechargs)
  1415. X+ long sigargs[], mechargs[];     /* [0] is argc, [1..argc] are the real args */
  1416. X+ {
  1417. X+     extern boolean hu;          /* src/save.c */
  1418. X+     long condition = sigargs[1];
  1419. X+ 
  1420. X+     if (condition == SS$_ACCVIO         /* access violation */
  1421. X+      || condition >= SS$_ASTFLT && condition <= SS$_TBIT
  1422. X+      || condition >= SS$_ARTRES && condition <= SS$_INHCHME) {
  1423. X+     if (wizard)
  1424. X+         abort();    /* enter the debugger */
  1425. X+     else
  1426. X+         hu = TRUE;  /* pretend that hangup has already been attempted */
  1427. X+     }
  1428. X+     return SS$_RESIGNAL;
  1429. X+ }
  1430. X+ #endif
  1431. X*** vms.old/vmstty.c    Thu May 24 20:20:31 1990
  1432. X--- vms/vmstty.c    Tue Jun 26 22:46:12 1990
  1433. X***************
  1434. X*** 21,27
  1435. X  
  1436. X  extern short ospeed;
  1437. X  char erase_char, intr_char, kill_char;
  1438. X! static boolean settty_needed = FALSE;
  1439. X  #ifndef MAIL
  1440. X  static        /* else global ('extern' in mail.c) */
  1441. X  #endif
  1442. X
  1443. X--- 21,27 -----
  1444. X  
  1445. X  extern short ospeed;
  1446. X  char erase_char, intr_char, kill_char;
  1447. X! static boolean settty_needed = FALSE,  bombing = FALSE;
  1448. X  #ifndef MAIL
  1449. X  static        /* else global ('extern' in mail.c) */
  1450. X  #endif
  1451. X***************
  1452. X*** 109,115
  1453. X  
  1454. X  static void
  1455. X  resettty(){            /* atexit() routine */
  1456. X!     if (settty_needed)
  1457. X      settty((char *)NULL);
  1458. X      (void) SYS$DASSGN(tt_chan),  tt_chan = 0;
  1459. X  }
  1460. X
  1461. X--- 109,116 -----
  1462. X  
  1463. X  static void
  1464. X  resettty(){            /* atexit() routine */
  1465. X!     if (settty_needed) {
  1466. X!     bombing = TRUE;     /* don't clear screen; preserve traceback info */
  1467. X      settty((char *)NULL);
  1468. X      }
  1469. X      (void) SYS$DASSGN(tt_chan),  tt_chan = 0;
  1470. X***************
  1471. X*** 111,116
  1472. X  resettty(){            /* atexit() routine */
  1473. X      if (settty_needed)
  1474. X      settty((char *)NULL);
  1475. X      (void) SYS$DASSGN(tt_chan),  tt_chan = 0;
  1476. X  }
  1477. X  
  1478. X
  1479. X--- 112,118 -----
  1480. X      if (settty_needed) {
  1481. X      bombing = TRUE;     /* don't clear screen; preserve traceback info */
  1482. X      settty((char *)NULL);
  1483. X+     }
  1484. X      (void) SYS$DASSGN(tt_chan),  tt_chan = 0;
  1485. X  }
  1486. X  
  1487. X***************
  1488. X*** 167,176
  1489. X  settty(s)
  1490. X  char *s;
  1491. X  {
  1492. X!     clear_screen();
  1493. X!     end_screen();
  1494. X!     if(s) Printf(s);
  1495. X!     (void) fflush(stdout);
  1496. X  #ifdef MAIL    /* this is essential, or lib$spawn & lib$attach will fail */
  1497. X      SMG$DISABLE_BROADCAST_TRAPPING(&pasteboard_id);
  1498. X  #endif
  1499. X
  1500. X--- 169,179 -----
  1501. X  settty(s)
  1502. X  char *s;
  1503. X  {
  1504. X!     if (!bombing) {
  1505. X!         end_screen();
  1506. X!         if(s) Printf(s);
  1507. X!         (void) fflush(stdout);
  1508. X!     }
  1509. X  #ifdef MAIL    /* this is essential, or lib$spawn & lib$attach will fail */
  1510. X      SMG$DISABLE_BROADCAST_TRAPPING(&pasteboard_id);
  1511. X  #endif
  1512. END_OF_FILE
  1513. if test 43223 -ne `wc -c <'patches09'`; then
  1514.     echo shar: \"'patches09'\" unpacked with wrong size!
  1515. fi
  1516. # end of 'patches09'
  1517. fi
  1518. echo shar: End of shell archive.
  1519. exit 0
  1520.